function getAddMenuForm(parentMenu, callback = Function()) {
    const $form = $(`
        <form class="mask-account">
            <div style="margin-top: 0">
                <span class="mask-account-tit">父菜单</span>
                <input type="hidden" name="parentMenuId" value="${parentMenu?.menuId || ""}">
            </div>
            <div>
                <span class="mask-account-tit"><sub style="color: red;">*</sub> 菜单名称</span>
                <span class="input-select"><input type="text" name="title" placeholder="请输入菜单名称" /></span>
            </div>
            <div>
                <span class="mask-account-tit">菜单地址</span>
                <span class="input-select"><input type="text" name="url" placeholder="请输入菜单地址" /></span>
            </div>
            <div>
                <span class="mask-account-tit">菜单排序</span>
                <span class="input-select"><input type="number" name="sortIndex" placeholder="请输入排序,小的排前面" /></span>
            </div>
            <div>
                <div class="row">
                    <div class="col-xs-9">
                        <span class="mask-account-tit">菜单icon</span>
                        <span class="input-select"><input type="text" name="iconClass" placeholder="请输入图标class，本项优先" /></span>
                    </div>
                    <div class="col-xs-3">
                        <i data-type="icon" style="font-size: 2rem"></i>
                    </div>
                </div>
            </div>
            <div>
                <span class="mask-account-tit">图片图标</span>
                <div class="input-select" style="border: 0;padding: 0">
                    <input type="hidden" name="iconImgUrl">
                </div>
            </div>
            <div style="text-align: center">
                <a data-btn="add" class="search-btn" href="javascript:">新增</a>
            </div>
        </form>
    `)


    queryMenuList({}, ({Code, Message, Result}) => {
        const menuList = Result ? Result : [];
        const parentMenuList = [{name: "一级菜单", value: ""}];


        menuList.filter(({parentMenuId}) => !parentMenuId).forEach(({title, menuId}) => {
            parentMenuList.push({name: title, value: menuId})
        });

        const $menuSel = $.getSelect("parentMenuId", parentMenuList);
        $form.find('[name="parentMenuId"]').replaceWith($menuSel);

        if (parentMenu && parentMenu.menuId) {
            $menuSel.find('[data-value="' + parentMenu.menuId + '"]').click();
        }
    })

    const $iconClassInput = $form.find('input[name=iconClass]')
    $iconClassInput.on("input", () => {
        $form.find('[data-type="icon"]').attr("class", $iconClassInput.val());
    })

    const $iconImgUrlInput = $form.find('input[name="iconImgUrl"]');

    $iconImgUrlInput.after(getUploadImgWidget({
        maxCount: 1,
        callback(urlList) {
            $iconImgUrlInput.val(urlList.join(","))
        }
    }));

    const $addBtn = $form.find('[data-btn="add"]');
    $addBtn.on("click", () => {
        const data = $.getFormData($form);
        addMenu(data, res => {
            if (res.Code !== 10000) {
                return $.toast(res.Message);
            }

            data.menuId = res.Result;
            callback(data);
        });
    });

    return $form;

    function addMenu(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Menu/addMenu",
        }, callback)
    }

    function queryMenuList(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Menu/queryMenuList",
        }, callback)
    }
}